Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tableau): restart server object when reauthenticating #12182

Merged
merged 6 commits into from
Dec 20, 2024

Conversation

sgomezvillamor
Copy link
Contributor

@sgomezvillamor sgomezvillamor commented Dec 19, 2024

We have experienced some errors at _re_authenticate

  File "/tmp/datahub/ingest/venv-tableau-7c5b0cea5d6480e5/lib/python3.10/site-packages/datahub/ingestion/source/tableau/tableau.py", line 1360, in emit_workbooks
    for workbook in self.get_connection_objects(
  File "/tmp/datahub/ingest/venv-tableau-7c5b0cea5d6480e5/lib/python3.10/site-packages/datahub/ingestion/source/tableau/tableau.py", line 1343, in get_connection_objects
    ) = self.get_connection_object_page(
  File "/tmp/datahub/ingest/venv-tableau-7c5b0cea5d6480e5/lib/python3.10/site-packages/datahub/ingestion/source/tableau/tableau.py", line 1190, in get_connection_object_page
    self._re_authenticate()
  File "/tmp/datahub/ingest/venv-tableau-7c5b0cea5d6480e5/lib/python3.10/site-packages/datahub/ingestion/source/tableau/tableau.py", line 902, in _re_authenticate
    self.server.auth.sign_in(tableau_auth)
  File "/tmp/datahub/ingest/venv-tableau-7c5b0cea5d6480e5/lib/python3.10/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 274, in wrapper
    return func(self, *args, **kwargs)
  File "/tmp/datahub/ingest/venv-tableau-7c5b0cea5d6480e5/lib/python3.10/site-packages/tableauserverclient/server/endpoint/auth_endpoint.py", line 84, in sign_in
    self._check_status(server_response, url)
  File "/tmp/datahub/ingest/venv-tableau-7c5b0cea5d6480e5/lib/python3.10/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 164, in _check_status
    raise FailedSignInError.from_response(server_response.content, self.parent_srv.namespace, url)
tableauserverclient.server.endpoint.exceptions.FailedSignInError: Failed Sign In Error:
    
        401001: Signin Error
                Error signing in to Tableau Server
[2024-12-18 08:32:44,885] INFO     {datahub.ingestion.reporting.file_reporter:54} - Wrote FAILURE report successfully to <_io.TextIOWrapper name='/tmp/datahub/logs/603f41d7-0d77-49aa-a640-6039c21402ab/artifacts/ingestion_report.json' mode='w' encoding='UTF-8'>

After some investigation we have found that

Force Token Revalidation

Tableau sometimes caches invalid sessions. Restart the Tableau Server or reinitialize the Tableau Server Client in your script

This worked before so this is a regression issue. We can see here how re-authentication mechanism was recreating the Tableau Server object in the past. So this PR restores previous approach.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@sgomezvillamor sgomezvillamor marked this pull request as ready for review December 20, 2024 06:54
@sgomezvillamor sgomezvillamor merged commit eceb799 into master Dec 20, 2024
94 of 101 checks passed
@sgomezvillamor sgomezvillamor deleted the feature/cus-3540-fix-tableau-reauth branch December 20, 2024 07:37
yoonhyejin pushed a commit to yoonhyejin/datahub-oss-forked that referenced this pull request Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata pending-submitter-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants